<?php
function load($params, $content){
    if(isset($content)){
        if(isset($params['file'])){
            $ftype = substr($params['file'], -3, 3);
            if(substr_count($ftype, 'css') == 1){
                echo "<link style='text/css' rel='stylesheet' href='".$params['file']."' />";
            }else if(substr_count($ftype, "js") == 1){
                echo "<script type='text/javascript' src='".$params['file']."'></script>";
            }
        }
    }
}
function import($params,$content){
    if(isset($content)){
        $import = new \components\template\tags\import();
        if(isset($params['library'])){
            $library = explode(",", $params['library']);
            foreach ($library as $key => $value) {
                if($value != ""){
                    $func = "get".$value;
                    $import->$func();
                }
            }
        }
    }
}
?>
